import { type ClassValue, clsx } from 'clsx';
import { twMerge } from 'tailwind-merge';

export function cn(...inputs: ClassValue[]) {
    return twMerge(clsx(inputs));
}

export const setCssVar = (prop: string, val: string, dom = document.documentElement) => {
    dom.style.setProperty(prop, val);
};

export const getCssVar = (prop: string, dom = document.documentElement) => getComputedStyle(dom).getPropertyValue(prop);
